<template>
	<view class="container">
		<button @click="toLogin" type="primary">前往登录页</button>
	</view>
</template>

<script setup>
import { utilEncodeURIComponentParams } from '../../utils/handle_page_navigate_params';
	const toLogin = ()=>{
		let params = {
			name:'测试路由跳转而已'
		}
		params = utilEncodeURIComponentParams(params)
		// 注意 这里只能是通过navigateTo来跳转 不能使用Vue-router
		uni.navigateTo({
			url:`/pages/login/login?params=${params}`,
		})
	}
</script>

<style>
	.container {
		padding: 20px;
		font-size: 14px;
		line-height: 24px;
	}
</style>